package com.shop2cn.iapi.sqpayment.testcase;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.shop2cn.iapi.sqpayment.parameter.CheckFqlSmsCodeBean;
import com.shop2cn.iapi.sqpayment.service.CheckFqlSmsCodeCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.*;
import com.ymt.utils.tag.*;
/**
*分期乐校验短信验证码
*FreeMaker Template自动生成代码
*/
@TestSuite
public class Ts_CheckFqlSmsCode{
	private static CheckFqlSmsCodeBean checkfqlsmscodeBean;
	private static CheckFqlSmsCodeCall checkfqlsmscodeCall;
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("分期乐校验短信验证码");
	}

	@Before
	public void caseUp() {
		checkfqlsmscodeBean=new CheckFqlSmsCodeBean();
		checkfqlsmscodeCall=new CheckFqlSmsCodeCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(checkfqlsmscodeCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_CheckFqlSmsCode_001() {
		Logger.start(true,"分期乐校验短信验证码成功");
		try {
			checkfqlsmscodeBean.setUserId(25328855);
			checkfqlsmscodeBean.setMobile("19999999999");
			checkfqlsmscodeBean.setSmsCode("1234");
			checkfqlsmscodeCall.setData(checkfqlsmscodeBean);
			checkfqlsmscodeCall.callService();			
			//{"ErrorCode":5000,"ErrorMessage":"验证码错误","IsSuccess":false,"FqlToken":null}
			Logger.verifyEquals("5000", checkfqlsmscodeCall.getString("ErrorCode"), "ErrorCode");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}